<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Deparment_Position_Level
 *
 * @author Jewel Tolentino
 */
class Department extends Formalistics {

    //put your code here
    public $position;
    public $is_active;
    public $name;

    public function __construct($db, $id) {
        $this->init($db, $id);
    }

    public function init($db, $id) {
        $this->db = $db;

        if ($id) {
            $result = $this->db->query("SELECT * FROM tborgchartobjects WHERE id = {$this->db->escape($id)}", "row");

            $this->id = $result['id'];
            $this->name = $result['department'];
        }
    }

}

?>
